package com.lqd.mall.system.service.impl;

import com.lqd.mall.basis.exception.ExceptionCast;
import com.lqd.mall.interaction.system.SysLogininforEntity;
import com.lqd.mall.jpa.service.impl.BaseServiceImpl;
import com.lqd.mall.system.repository.SysLogininforEntityRepository;
import com.lqd.mall.system.service.ISysLogininforService;
import jdk.nashorn.internal.ir.annotations.Reference;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author 零起点
 * @create 2022-02-13 12:09
 */
@Service
public class ISysLogininforServiceImpl
        extends BaseServiceImpl<SysLogininforEntityRepository,
        SysLogininforEntity, Long>
        implements ISysLogininforService {


    @Resource
    SysLogininforEntityRepository sysLogininforEntityRepository;

    @Override
    public int saveLogininfor(SysLogininforEntity sysLogininforEntity) {
        if (sysLogininforEntityRepository == null) {
            ExceptionCast.cast("不能添加空登录日志");
        }
        SysLogininforEntity save = sysLogininforEntityRepository.save(sysLogininforEntity);
        return 1;
    }
}
